import request from '@/utils/request'
import requestsso from '@/utils/requestSingleSignOn'

export function getCode(params) {
  return requestsso({
    url: '/user/login/loadchkcode',
    method: 'get',
    responseType: 'blob',
    params
  })
}
export function forget1(data) {
  return requestsso({
    url: '/user/login/forget1',
    method: 'post',
    data
  })
}
export function forget2(data) {
  return requestsso({
    url: '/user/login/forget2',
    method: 'post',
    data
  })
}
export function getMobileCode(params) {
  return requestsso({
    url: '/sms/sendCodeYC',
    method: 'post',
    params
  })
}
export function login(data) {
  return requestsso({
    url: '/user/login/plgn',
    method: 'post',
    data
  })
}
export function reg(data) {
  return requestsso({
    url: '/user/login/reg1',
    method: 'post',
    data
  })
}
export function getInfoByToken() {
  return requestsso({
    url: '/user/ent/infoByToken',
    method: 'get'
  })
}

export function userUpdate(data) {
  return requestsso({
    url: '/user/ent/update',
    method: 'post',
    data
  })
}

export function loginOut() {
  return requestsso({
    url: '/user/login/logout',
    method: 'get'
  })
}

export function getInfo(data) {
  return request({
    url: '/agent/info',
    method: 'post',
    data
  })
}

export function logout(data) {
  return request({
    url: '/agent/logout',
    method: 'post',
    data
  })
}
export function updatePassWord(data) {
  return request({
    url: '/agent/updatePass',
    method: 'post',
    data
  })
}
// 修改密码
export function loginUpdatePassword(data) {
  return requestsso({
    url: '/user/login/updatePassword',
    method: 'post',
    data
  })
}

